/**
 * Created by CodeTlan.
 * User: Ing. Miguel Salas
 * Date: 3/29/12
 * Time: 12:22 AM
 */
Ext.define('CT.view.historial.Grid', {
    extend: 'Ctc.view.EditorGrid',
    alias:"widget.gridhistorial",
    store:'Historiales',
    requires:'Ext.ux.grid.checkcolumn.CheckColumn',
    buildColumns: function(){
        return [
            { xtype: 'rownumberer'},
            { header: 'Fecha', dataIndex: 'fecha', width:70, editor: { xtype: 'datemx', allowBlank: false }, renderer: Ext.util.Format.dateRenderer('d/m/Y')},
            { header: 'Militancia', dataIndex: 'titulo', flex:1, editor: { maxLength:500, allowBlank: false }},
            { header: 'Descripción', dataIndex: 'descripcion', flex:2, editor: { xtype:'textarea', allowBlank: false }},
            { align:'center', width:40, dataIndex: 'activo', xtype:'checkcolumn', editor: { xtype: 'checkbox', cls: 'x-grid-checkheader-editor' }},
            { align:'center', width:40, renderer:this._renderEliminar, editor:{xtype:'hiddenfield'} }
        ];
    },
    _renderEliminar:function(value){
        return "<img src='img/icons/16/del.png' style='cursor:pointer'>";
    }
});